<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="__CSS__/layui.css"  media="all">
  <script src="__UI__/layui.js"></script>
</head>
<style>
	body{padding-right: 45px}
</style>
<body>
<form class="layui-form" action="">
  <div class="layui-form-item">
    <label class="layui-form-label">是否罚款</label>
    <div class="layui-input-block">
      <input type="radio" name="punish" value="1" title="罚款">
      <input type="radio" name="punish" value="0" title="不罚款" checked>
    </div>
  </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">处理内容</label>
    <div class="layui-input-block">
      <textarea name="result" placeholder="请输入内容" class="layui-textarea" cols="5" rows="5" style="resize: none;"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
  <input type="hidden" name="cid" value="{$cid}">
</form>
 
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});
</script>

</body>
</html>
